import request from './request'

export const list = (data) => {
  return request({
    url: '/workInfo/list',
    method: 'POST',
    data
  })
}

export const save = (data) => {
  return request({
    url: '/workInfo/save',
    method: 'POST',
    data
  })
}

export const modify = (data) => {
  return request({
    url: '/workInfo/modify',
    method: 'POST',
    data
  })
}

export const remove = (data) => {
  return request({
    url: '/workInfo/remove',
    method: 'POST',
    data
  })
}

/**
 * 工单分配
 * @param data
 * @returns {AxiosPromise}
 */
export const repair = (data) => {
  return request({
    url: '/workInfo/repair',
    method: 'POST',
    data
  })
}

/**
 * 返回技师用户
 * @param data
 * @returns {AxiosPromise}
 */
export const userRole = (data) => {
  return request({
    url: '/user/userRole',
    method: 'POST',
    data
  })
}
